﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
using Microsoft.Windows.Controls.Ribbon;


namespace ScrumMagic
{
    /// <summary>
    /// Interaction logic for TaskListRibbon.xaml
    /// </summary>
    public partial class TaskListRibbon : Window
    {
        public struct Context
        {
            public ComboBox Combobox { get; set;}
        }

        public ComboBox Combobox { get; set; }

        public TaskListRibbon()
        {
            InitializeComponent();
            //RibbonComboBoxItem item1 = new RibbonComboBoxItem();
            //item1.Content = "siska";
            //ribbonComboboxFilter.Items.Add(item1);

            //RibbonComboBoxItem item2 = new RibbonComboBoxItem();
            //item2.Content = "siska";
            //ribbonComboboxFilter.Items.Add(item2);   

            //ribbonComboboxFilter.SelectedItem = ribbonComboboxFilter.Items[0];
            ribbonComboboxSprint.Text = "Any Sprint..";
            ribbonComboboxProject.Text = "Any Project..";
            ribbonComboboxProduct.Text = "Any Product..";
        }

        private void OnRibbonCommandCanExecute(object sender, System.Windows.Input.CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
        }

        private void RibbonCommandFind(object sender, EventArgs e)
        {
            if (FindButtonClicked != null)
            {
                FindButtonClicked(sender, new TextEventArgs(textBox.Text));
            }
        }

        public event EventHandler<TextEventArgs> FindButtonClicked;
        public event EventHandler<TextEventArgs> FilterButtonClicked;
        public event EventHandler AddButtonClicked;

        private void RibbonAddButtonClick(object sender, RoutedEventArgs e)
        {
            if (AddButtonClicked != null)
            {
                AddButtonClicked(sender, e);
            }
        }

        private void RibbonButton_Click_1(object sender, RoutedEventArgs e)
        {
            if (FilterButtonClicked != null)
            {
                FilterButtonClicked(sender, new TextEventArgs(ribbonComboboxSprint.SelectedItem.ToString()));
            }
        }

        private void buttonProject_Click(object sender, RoutedEventArgs e)
        {

        }

    }
}
